<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <canvas id="canvas" width="400" height="400"></canvas>
  </body>
  <script>
    /** @type {HTMLCanvasElement} */
    const canvas = document.getElementById("canvas");
    const gl = canvas.getContext("webgl");
    //着色器
    const VERTEX_SHADER_SOURCE = `
        void main(){
            gl_Position = vec4(0.0,0.0,0.0,1.0);
            gl_PointSize = 10.0
        }
    `; // 顶点着色器
    const FRAGEMENT_SHADER_SOURCE = `
        void main(){
            gl_FragColor = vec4(1.0,0.0,0.0,1.0)
        }
    `; // 片元着色器
  </script>
</html>
